package scene;

import java.util.*;
import gameObject.*;

public class Scene 
{
	protected ArrayList<GameObject> gameObjects = new ArrayList<GameObject>();

	public final void load()
	{
		for(GameObject obj:gameObjects)
		{
			obj.setActive(true);
		}
		onLoad();
	}
	protected void onLoad() {}
	public final void unLoad()
	{
		for(GameObject obj:gameObjects)
		{
			obj.setActive(false);
		}
		onUnLoaded();
	}
	protected void onUnLoaded() {}
	
	public final GameObject addGameObject(GameObject obj)
	{
		obj.setActive(false);
		gameObjects.add(obj);
		return obj;
	}
}
